package com.qf.exception;/*
 *保护你的大熊
 *2021/11/23
 *19:51
 */

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.naming.AuthenticationException;

@ControllerAdvice
public class MyHandlerException {

    @ExceptionHandler({
            AuthorizationException.class
    })

    public String handlerAuthorizationException(AuthorizationException e){
        e.printStackTrace();
        return "unauthorizedUrl.html";
    }

    @ExceptionHandler({
            Exception.class
    })
    public String handlerException(Exception e){
        e.printStackTrace();
        return "login.html";
    }
}
